#include "mypushbutton.h"


MyPushButton::MyPushButton(QString normalImg, QString pressIng)
{
    this->normalImgPath=normalImg;
    this->pressImgPath=pressIng;

    QPixmap pix;
    bool ret=pix.load(normalImg);
    if(!ret)
    {
        qDebug()<<"加载失败";
        return;
    }

    this->setFixedSize(pix.width(),pix.height());

    this->setStyleSheet("QPushButton{border:0px;}");

    this->setIcon(pix);

    this->setIconSize(QSize(pix.width(),pix.height()));
}
